The present application relates to vector based software rendering applications and more specifically to reducing path complexity and precision in vector-based data visualization maps.
To support high resolution on a desktop computer or workstation data visualization maps often contain high precision path and coordinate data.
In vector based imaging programs, such as the Scalar Vector Graphics (SVG) standard promulgated by the World Wide Web Consortium, simple graphic elements are defined by tags in an Extensible Markup Language (XML) document. Complex graphic images can be composed using the basic graphic elements. The appearance and location of a particular graphic element are controlled by assigning values to the attributes of the graphic element.
Rendering of an SVG image occurs in a rectangular region called the SVG viewport. The height and width of the SVG viewport are specified by numbers of pixels. Another number may also be provided that specifies the size of a pixel in, for example, millimeters.
The SVG path is the basic drawing primitive of SVG that is used to draw lines, shapes circles, curves and arcs. A path primitive for a group drawing line segments includes a move command that specifies the pixel coordinates where the group of line segments and line commands specifying the endpoint of a line segment to be drawn.
The pixel positions in a path primitive may be specified in absolute or relative coordinates. When using absolute coordinates each pixel position is specified by the displacement from a fixed point in the viewport. When using relative coordinates each pixel position is specified by a displacement from the last drawing point.
In the SVG language move commands referring to absolute coordinates are indicated with a capital letter (M) and those that refer to relative coordinates are indicated by a small letter (m). Relative line commands may be indicated by an “l” and vertical or horizontal line to commands are indicated by “v” or “h” respectively. An absolute close path command is indicated by a “Z” and a relative close path command A path includes a list of commands. The pseudo-code includes a switch statement having cases for “M”, “m”, “l”, “h” and “v” commands.